
class_name TemplateSelectItem
extends Control




@onready var rr: ReferenceRect = $RR
@onready var info_text: Label = $Info

var save_object: Node = null
var is_select: bool = false




func set_select(_key: bool) -> void:
	is_select = _key
	if is_select:
		set_color(Color8(255, 255, 255))
	else:
		set_color(Color8(0, 0, 0))




## 设置 label 颜色
func set_info_color(_color: Color) -> void:
	info_text.modulate = _color
	pass




## 设置颜色，传入 key 值。用于在不改变选中状态的情况下改变颜色
func set_color(_color: Color) -> void:
	rr.border_color = _color




func set_info_text(_text: String) -> void:
	info_text.text = _text




func get_info_text() -> String:
	return info_text.text
